package com.yunhe.common.model.authority;

import java.io.Serializable;
import java.util.List;

/**
 * 角色对象
 * @desc 角色对象定义
 * @author liuronglei
 */
public class Role implements Comparable<Role>, Serializable {
    private Long id;
    private String name;
    private String title;
    private String activity;
    private String createTime;
    private Integer level;
    private List<Role> children;

    @Override
    public int compareTo(Role o) {
        if (this.level == null) {
            return -1;
        } else if (o.getLevel() == null) {
            return 1;
        }
        return this.level.compareTo(o.getLevel());
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getActivity() {
        return activity;
    }

    public void setActivity(String activity) {
        this.activity = activity;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }
}
